﻿<navigation:Page 
    x:Class="Plugin1.Page2" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
    xmlns:my="clr-namespace:Plugin1"
    d:DesignWidth="640" d:DesignHeight="480"
    Title="Page2 Page">
    <Grid x:Name="LayoutRoot">
        <TextBlock Text="Plugin1.Page2 要呈现的页面"/>
        
        <Grid x:Name="gridToResize" MinHeight="100" MinWidth="100" Background="Black" Width="200" Height="200" >
            <i:Interaction.Behaviors>
                <my:ResizeBehavior  IsEnable="True" ResizeElement="{Binding ElementName=ResizeLeft}" CurResizeDirection="ResizeLeft"/>
                <my:ResizeBehavior  IsEnable="True" ResizeElement="{Binding ElementName=ResizeTop}" CurResizeDirection="ResizeTop"/>
                <my:ResizeBehavior  IsEnable="True" ResizeElement="{Binding ElementName=ResizeLTCorner}" CurResizeDirection="ResizeLTCorner"/>
                <my:ResizeBehavior  IsEnable="True" ResizeElement="{Binding ElementName=ResizeRight}" CurResizeDirection="ResizeRight"/>
                <my:ResizeBehavior  IsEnable="True" ResizeElement="{Binding ElementName=ResizeBottom}" CurResizeDirection="ResizeBottom"/>
                <my:ResizeBehavior  IsEnable="True" ResizeElement="{Binding ElementName=ResizeRDCorner}" CurResizeDirection="ResizeRDCorner"/>
                <my:ResizeBehavior  IsEnable="True" ResizeElement="{Binding ElementName=ResizeLDCorner}" CurResizeDirection="ResizeLDCorner"/>
                <my:ResizeBehavior  IsEnable="True" ResizeElement="{Binding ElementName=ResizeRTCorner}" CurResizeDirection="ResizeRTCorner"/>
            </i:Interaction.Behaviors>
            <Rectangle x:Name="ResizeLeft" Fill="Transparent" RadiusX="2" RadiusY="2" Width="6" HorizontalAlignment="Left" VerticalAlignment="Stretch" Opacity="0.5" Cursor="SizeWE"/>
            <Rectangle x:Name="ResizeTop" Fill="Transparent" RadiusX="2" RadiusY="2" Height="6" HorizontalAlignment="Stretch" VerticalAlignment="Top" Opacity="0.5" Cursor="SizeNS"/>
            <Rectangle x:Name="ResizeLTCorner" Fill="Transparent" RadiusX="2" RadiusY="2" Width="6" Height="6" HorizontalAlignment="Left" VerticalAlignment="Top" Opacity="0.5" Cursor="SizeNWSE"/>
            <Rectangle x:Name="ResizeRight" Fill="Transparent" RadiusX="2" RadiusY="2" Width="6" HorizontalAlignment="Right" VerticalAlignment="Stretch" Opacity="0.5" Cursor="SizeWE"/>
            <Rectangle x:Name="ResizeBottom" Fill="Transparent" RadiusX="2" RadiusY="2" Height="6" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Opacity="0.5" Cursor="SizeNS"/>
            <Rectangle x:Name="ResizeRDCorner" Fill="Transparent" RadiusX="2" RadiusY="2" Width="6" Height="6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Opacity="0.5" Cursor="SizeNWSE"/>
            <Rectangle x:Name="ResizeLDCorner" Fill="Transparent" RadiusX="2" RadiusY="2" Width="6" Height="6" HorizontalAlignment="Left" VerticalAlignment="Bottom" Opacity="0.5" Cursor="SizeNESW"/>
            <Rectangle x:Name="ResizeRTCorner" Fill="Transparent" RadiusX="2" RadiusY="2" Width="6" Height="6" HorizontalAlignment="Right" VerticalAlignment="Top" Opacity="0.5" Cursor="SizeNESW"/>
        </Grid>
    </Grid>
</navigation:Page>
